#include "LinkRecord.h"
#include <string>

int
LinkRecord::compare(LinkRecord* r)
{
	return LinkRecordCompare(this, r);
}

int LinkRecordHash(LinkRecord* rec) {
	return (int)rec;
}

int LinkRecordCompare(LinkRecord* a, LinkRecord* b)
{
	if (a->subj != b->subj)
		return a->subj.compare(b->subj);
	if (a->obj != b->obj)
		return a->obj.compare(b->obj);
	return a->link.compare(b->link);
}

int LinkRecordCompareSubject(LinkRecord* a, LinkRecord* b)
{
	return a->subj.compare(b->subj);
}

int LinkRecordCompareObject(LinkRecord* a, LinkRecord* b)
{
	return a->obj.compare(b->obj);
}

int LinkRecordCompareLink(LinkRecord* a, LinkRecord* b)
{
	return a->link.compare(b->link);
}
